![]() |
PATH![]() |
![]() ![]() |
Associates a theme-compliant color or pattern with the background of a window.
pascal OSStatus SetThemeWindowBackground (
WindowPtr inWindow,
ThemeBrush inBrush,
Boolean inUpdate);
The SetThemeWindowBackground function sets the color or pattern to which the Window Manager erases the window background.
Because the constant in the inBrush parameter can represent a color or pattern, depending on the current theme, your application must save and restore the current drawing state of the graphics port around calls to SetThemeWindowBackground . Under Appearance Manager 1.1 and later, you can use the functions GetThemeDrawingState and SetThemeDrawingState to do this. Prior to Appearance Manager 1.1, you must save and restore the pnPixPat and bkPixPat fields of your graphics port when saving the text and background colors. Because patterns in the bkPixPat field override the background color of the window, call the QuickDraw function BackPat to set your background pattern to a normal white pattern. This ensures that you can use RGBBackColor to set your background color to white, call the QuickDraw function EraseRect , and get the expected results.